package org.asl;

import java.lang.Thread.UncaughtExceptionHandler;

import android.util.Log;

public class DefaultExceptionHandler implements UncaughtExceptionHandler{
	  //constructor
	  public DefaultExceptionHandler()
	  {
	  }
	  
	  public void uncaughtException(Thread t, Throwable e) {       
	        //do some action like writing to file or upload somewhere         

	        //call original handler  
		  	Log.e("EXCEPTION", e.getMessage());
		  	e.printStackTrace();
	        // cleanup, don't know if really required
	        t.getThreadGroup().destroy();
	  }
}
